/*
package com.itstyle.jpa.repository;

import com.itstyle.jpa.entity.UserAndClassModel;
import com.itstyle.jpa.model.Student;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.List;

public interface StudentRepository extends JpaRepository {


    @Query("select\n" +
            "  s.id as studentId,\n" +
            "  s.name as studentName,\n" +
            "  s.age as studentAge,\n" +
            "  c.id as classId,\n" +
            "  c.class_name as className,\n" +
            "  c.teacher_name as teacherName\n" +
            "from  app_student s  LEFT JOIN app_class c on s.class_id = c.id")
    Page<UserAndClassModel> getUserAndClassModel();

}
*/
